
#pragma once

#include "base/core/singleton.h"
#include "Common/TableDefine.h"


class GMCommandGMCommandCfg : public ManualSingleton <GMCommandGMCommandCfg>
{
	friend ManualSingleton <GMCommandGMCommandCfg>;
public:
	GMCommandGMCommandCfg();
	~GMCommandGMCommandCfg();
	bool Init(const char *szCfgFile, const char *szSplitChar);
	bool UnInit();
	void Clear();
	const GMCommandGMCommandCfgInfo *GetGMCommandGMCommandCfgInfo(int32_t ID);
	const GMCommandGMCommandCfgMap *GetGMCommandGMCommandCfgMap() { return &m_GMCommandGMCommandCfgMap; }
private:
	GMCommandGMCommandCfgMap m_GMCommandGMCommandCfgMap;
};

#define  g_MakeGMCommandGMCommandCfgTable() (GMCommandGMCommandCfg::Instance())
#define  g_GetGMCommandGMCommandCfgTable() (GMCommandGMCommandCfg::GetInstance())
#define  g_DelGMCommandGMCommandCfgTable() (GMCommandGMCommandCfg::Destroy())